﻿using System.Linq;
using System.Collections.Generic;

namespace NMA.Infrastructure.NHibernate.Service.EventAggregator
{
    using NMA.Infrastructure.EventAggregator;
    using NMA.Infrastructure.NHibernate.Container;    

    public class EventSubscriptions : ISubscriptionService
    {
        public static void Add<T>()
        {
            // nothing to adding at here
        }

        public IEnumerable<IConsumer<T>> GetSubscriptions<T>()
        {
            var consumers = IoC.GetAllInstances(typeof(IConsumer<T>));
            return consumers.Cast<IConsumer<T>>();
        }
    }
}